//
//  BackPicLabelView.m
//  UI_APP_Project_Bean
//
//  Created by Gavin–fan on 16/6/23.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "BackPicLabelView.h"

@interface BackPicLabelView ()

@property(nonatomic, retain)UIImageView *back;

@end



@implementation BackPicLabelView

- (void)dealloc
{
    [_back release];
    [_picView release];
    [_nameLabel release];
    [super dealloc];
}


-(instancetype)initWithFrame:(CGRect)frame{
    
    if (self = [super initWithFrame:frame]) {
        
        self.back = [[UIImageView alloc]init];
        [self addSubview:_back];
        [_back release];
        
        self.picView = [[UIImageView alloc]init];
        [_back addSubview:_picView];
        [_picView release];
        
        self.nameLabel = [[UILabel alloc]init];
        [_back addSubview:_nameLabel];
        [_nameLabel release];
        
        
    }
    
    return self;
    
}


-(void)layoutSubviews{
    
    self.back.frame = CGRectMake(10, 10, CGRectGetWidth(self.bounds) - 20, CGRectGetHeight(self.bounds) - 20);
    _back.image = [UIImage imageNamed:@"bg_eventlistcell.png"];
      self.picView.frame = CGRectMake(5, 5, _back.frame.size.width / 3, _back.frame.size.height-10);
    self.nameLabel.frame= CGRectMake(_picView.frame.size.width + 15,_back.frame.size.height / 4 ,_back.frame.size.width - _picView.frame.size.width - 30 , _back.frame.size.height / 2);
   
}











@end
